package com.thinkTank.oa.lucene;

import java.util.List;

import org.apache.solr.client.solrj.beans.Field;

/**
 * 需求默认匹配专家的匹配方式
 * 所在地区是一对一匹配   专家的领域（所属领域、专业领域）与需求的需求名称、需求内容、所属领域匹配
 * @author dq
 * @date 2018-09-17
 *
 */
public class LucenePerson {
	@Field
	String expertId;// 专家ID
	@Field
	String expertNumber ;//专家number
	@Field
	String source ;//  专家来源
	@Field
	String type;//专家类型
	@Field
	List<String> researchField;//专家领域 
	@Field
	String area;//专家所在地区
	@Field
	List<String> talentLevel;// 人才级别
	@Field
	String name;// 专家姓名
	@Field
	String schoolAndMajor;//毕业院校及所学专业
	@Field
	String unit;// 单位
	@Field
	String title;//职务(职称)
	@Field
	String professionaField;// 专业领域
	@Field
	String education;//教育背景
	@Field
	String workExp;//工作经历
	@Field
	String honorAward;//荣誉奖励
	@Field
	String technica;//科技成果
	//返回领域字符串用逗号隔开
	public String getResear(){
		
		if(null!=researchField){
			String  str="";
			for(String s :researchField){
				str+=s+",";
			}
			if(!"".equals(str)){
				str=str.substring(0,str.length()-1);
			}
			return str;
				
		}
		return null;
	}
	public static String getFileds(String key){
		if(key==null||key.equals("")){
			return "person";
		}else if(key.equals("expertId")){
			return "expertId";
		}else if(key.toLowerCase().equals("en")){
			return "expertNumber";
		}else if(key.toLowerCase().equals("sr")){
			return "source";
		}else if(key.toLowerCase().equals("pt")){
			return "type";
		}else if(key.toLowerCase().equals("rf")){
			return "researchField";
		}else if(key.toLowerCase().equals("area")){
			return "area";
		}else if(key.toLowerCase().equals("tl")){
			return "talentLevel";
		}else if(key.toLowerCase().equals("ps")){
			return "name";
		}else if(key.toLowerCase().equals("name")){
			return "schoolAndMajor";
		}else if(key.toLowerCase().equals("unit")){
			return "unit";
		}else if(key.toLowerCase().equals("ti")){
			return "title";
		}else if(key.toLowerCase().equals("pf")){
			return "professionaField";
		}else if(key.toLowerCase().equals("edu")){
			return "education";
		}else if(key.toLowerCase().equals("wp")){
			return "workExp";
		}else if(key.toLowerCase().equals("had")){
			return "honorAward";
		}else if(key.toLowerCase().equals("ta")){
			return "technica";
		}else{
			return "person";
		}
	}
	
	public LucenePerson(String expertId ,String expertNumber,String source, String type,List<String> researchField,String area,List<String> talentLevel,String name, String schoolAndMajor,String unit,String title, String professionaField,String education,String workExp,String  honorAward,String technica){
		this.expertId= expertId ;
		this.expertNumber	=expertNumber;
		this.source=source;
		this.type= type;
		this.researchField =researchField;
		this.area =area;
		this.talentLevel= talentLevel;
		this.name =name;
		this.schoolAndMajor= schoolAndMajor;
		this.unit =unit;
		this.title= title;
		this.professionaField= professionaField;
		this.education= education;
		this.workExp= workExp;
		this.honorAward= honorAward;
		this.technica =technica;
	}
	
	public LucenePerson(){	}

	public String getExpertId() {
		return expertId;
	}

	public void setExpertId(String expertId) {
		this.expertId = expertId;
	}

	public String getExpertNumber() {
		return expertNumber;
	}

	public void setExpertNumber(String expertNumber) {
		this.expertNumber = expertNumber;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public List<String> getResearchField() {
		return researchField;
	}

	public void setResearchField(List<String> researchField) {
		this.researchField = researchField;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public List<String> getTalentLevel() {
		return talentLevel;
	}

	public void setTalentLevel(List<String> talentLevel) {
		this.talentLevel = talentLevel;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSchoolAndMajor() {
		return schoolAndMajor;
	}

	public void setSchoolAndMajor(String schoolAndMajor) {
		this.schoolAndMajor = schoolAndMajor;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getProfessionaField() {
		return professionaField;
	}

	public void setProfessionaField(String professionaField) {
		this.professionaField = professionaField;
	}

	public String getEducation() {
		return education;
	}

	public void setEducation(String education) {
		this.education = education;
	}

	public String getWorkExp() {
		return workExp;
	}

	public void setWorkExp(String workExp) {
		this.workExp = workExp;
	}

	public String getHonorAward() {
		return honorAward;
	}

	public void setHonorAward(String honorAward) {
		this.honorAward = honorAward;
	}

	public String getTechnica() {
		return technica;
	}

	public void setTechnica(String technica) {
		this.technica = technica;
	}
	
}
